package com.zt.dev.semiPhysicalEquipment.mapper;

import com.zt.dev.semiPhysicalEquipment.pojo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SemiPhysicalEquipmentMapper {

    int hardWareRegist(SemiPhysicalEquipmentInfo semiPhysicalEquipmentInfo);

    int getCount(Integer equipmentId);

    List<SemiPhysicalEquipmentInfo> findAllHardWare(int start, int end,Integer equipmentId);
    /**修改装备信息*/
    int editHardWareById(SemiPhysicalEquipmentInfo semiPhysicalEquipmentInfo);
    /**修改装备使用信息*/
    int editUseInfo(SemiPhysicalUseInfo useInfo);
    /**修改装备性能信息*/
    int editPerformanceValue(SemiPhysicalPerformanceValue value);

    int removeHardWareById(@Param(value = "ids") int[] ids);

    Integer insertPerformances(SemiPhysicalPerformanceValue performance);

    /**通过装备id获取装备信息*/
    SemiPhysicalEquipmentInfo findHardWareById(Integer id);
    /**通过装备id获取装备使用信息*/
    List<SemiPhysicalUseInfo> findAllUseInfo(int id);

    /**装备使用信息入库*/
    int insertUseInfo(SemiPhysicalUseInfo semiPhysicalUseInfo);

    /**获取所有装备*/
    List<SemiPhysicalEquipment> findAllEquipment();
    /**获取所有性能*/
    List<SemiPhysicalPerformance> findAllPerformances(Integer equipmentId);
    /**获取装备性能值列表*/
    List<SemiPhysicalPerformanceValue> findAllPerformanceVal(int id);
    /**获取某装备下所有的装备详情*/
    List<SemiPhysicalEquipmentInfo> findAllEquipmentInfoById(Integer id);
    /**通过装备名称查询装备*/
    SemiPhysicalEquipment getEquipmentByName(String sheetName);
    /**通过性能名称和装备id查询性能*/
    SemiPhysicalPerformance findPerByNameAndequipId(String name, Integer equipmentId);


    List<SemiPhysicalEquipmentInfo> findAllInfoByIdAndTime(@Param("id") Integer id,
                                                           @Param("startTime") String startTime,
                                                           @Param("endTime")String endTime);

}
